<?php
/*
 * @author eBIZ Team <dev@jungo.com.cn>
 * @copyright  Copyright (c) , ShenZhen JunGO Technology Co., Ltd. All rights reserved.
 * @license  Commercial authorization, unauthorized use and modification are prohibited
 * @url www.jungo.com.cn
 */

namespace ckeeper\services;


use ckeeper\entity\RegionEntity;

interface RegionService
{

    /**
     * 获取城市列表
     * @param int $pid
     * @return array
     */
    public function getCityList(int $pid): array;

    /**
     * 获取所有城市列表
     * @return array
     */
    public function getAllRegionList():array;

    /**
     * 根据id获取地址详情
     * @param int $id
     * @return array
     */
    public function getRegionDetailById(int $id): array;

    /**
     * 获取地区名称
     * @param int $id
     * @return string
     */
    public function getRegionName(int $id): string;


    /**
     * @param string $name
     * @param int $level
     * @param string|null $cityName
     * @param string|null $provinceName
     * @return RegionEntity|null
     */
    public function getRegionByNameAndLevel(string $name, int $level, ?string $cityName = null, ?string $provinceName = null): ?array;

}
